/*
 * @Author: Yang qiuyou wangyi168359476@163.com
 * @Date: 2024-07-26 11:15:02
 * @LastEditors: Wang Shuo wangshuo@sgsimulation.com
 * @LastEditTime: 2024-08-30 10:32:48
 * @FilePath: \SGFEM\DataStructure\FEM\Constraint\include\RRODData.h
 * @Description: RROD
 */

#pragma once
#include "DataStructure/Common/DataStructureNamespace.h"
#include "DataStructure/Common/Id.h"
#include "DataStructure/Common/Real.h"
#include "DataStructure/Input/Element/ElementBase.h"
#include "DataStructure/Input/Solver/DOFDirections.h"

SG_DATASTRUCTURE_FEM_NAMESPACE_OPEN
struct DECLSPEC RRODData : public ElementBase
{
    SG::DataStructure::Common::Id   m_G1             = 0;    ///< DOF1对于应的节点标识号
    SG::DataStructure::Common::Id   m_G2             = 0;    ///< DOF2对于应的节点标识号
    SG::DataStructure::Common::I64  m_DOF1           = 0;    ///< 1号节点上主自由度集合
    SG::DataStructure::Common::I64  m_DOF2           = 0;    ///< 2号节点上自由度集合
    SG::DataStructure::Common::Real m_alpha          = 0.0;  ///< 热膨胀系数
    SG::DataStructure::Common::Real m_refTemperature = 0.0;  ///< 参考温度
    SG::DataStructure::Common::Id   m_domainId       = 0;

    /**
     * @brief 获取一号自由度集
     *
     * 返回一号自由度集的引用。
     *
     * @return 一号自由度集的引用
     */
    SG::DataStructure::FEM::DOFDirections GetDOF1 () const;
    void                                  SetDOF1 (const SG::DataStructure::FEM::DofSet& dofs);

    /**
     * @brief 获取二号自由度集
     *
     * 返回二号自由度集的引用。
     *
     * @return 二号自由度集的引用
     */
    SG::DataStructure::FEM::DOFDirections GetDOF2 () const;
    void                                  SetDOF2 (const SG::DataStructure::FEM::DofSet& dofs);
};

/// @brief 判断两个RRODData是否相等
/// @param a
/// @param b
/// @return
DECLSPEC bool operator== (const RRODData& a, const RRODData& b);

SG_DATASTRUCTURE_FEM_NAMESPACE_CLOSE